#!/usr/bin/env bash
function gvm_environment_sanitize() {
	local ACTIVE_GO="$(command -v go)"
	if [[ "${ACTIVE_GO/${GOROOT}}" != "/bin/go" ]]; then
		OLD_GOROOT="$GOROOT" && unset GOROOT
		GOROOT="$(go env GOROOT)"
		$SED_PATH -i'' -e 's|'${OLD_GOROOT}'|'${GOROOT}'|g' "$GVM_ROOT/environments/$1"
		. "$GVM_ROOT/environments/$1" &> /dev/null
	fi
}
